package org.linlinjava.litemall.db.service;

import org.linlinjava.litemall.db.dao.AgedmallShipChargeRuleMapper;
import org.linlinjava.litemall.db.domain.AgedmallShipChargeRule;
import org.linlinjava.litemall.db.domain.AgedmallShipChargeRuleExample;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class AgedmallShipChargeRuleService {
    @Resource
    private AgedmallShipChargeRuleMapper agedmallShipChargeRuleMapper;

    public AgedmallShipChargeRule getByGoodsId(Integer goodsId) {
        AgedmallShipChargeRuleExample example = new AgedmallShipChargeRuleExample();
        example.or().andDeletedEqualTo(false)
                .andGoodsIdEqualTo(goodsId);
        return agedmallShipChargeRuleMapper.selectOneByExampleWithBLOBs(example);
    }
}
